package cn.itcast.anno;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * @author StormArcita
 * @date 2024-12-10 8:59
 */
@Aspect //聲明為切面
@Component
public class LogAspect {

    @Before("execution(public int cn.itcast.anno.CalculatorPureImpl.add(int,int))") //前置通知
    public void beforeLog() {
        System.out.println("前置通知: 日志开始");
    }
}
